package com.yuehuanghun.admin.core.domain;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;

import lombok.Data;

/**
 * 用户和岗位关联 sys_user_post
 * 
 * @author yadmin
 */
@Data
@Entity
public class SysUserPost {
	/** 用户ID */
	@JsonFormat(shape = Shape.STRING)
	private Long userId;

	/** 岗位ID */
	@JsonFormat(shape = Shape.STRING)
	private Long postId;

	@ManyToOne
	@JoinColumn(name = "user_id")
	private SysUser user;
	
	@ManyToOne
	@JoinColumn(name = "post_id")
	private SysPost post;
}
